public class T3_5{
    public static void main(String s[]){
	long a=8,b=8,sum=0;
	for(int i=1;i<=10;i++){
	  sum=sum+b;
	  b=b*10+a;
	}
	System.out.println(sum);
    }
}
